package guoanmaker.provider.business.repository;

import guoanmaker.provider.business.model.ProvideShop;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

/**
 * DESC:
 * Created by JTing on 2017/12/15 10:32
 */
public interface ProvideShopRepository extends JpaRepository<ProvideShop,String> ,JpaSpecificationExecutor<ProvideShop> {
    @Query("select t from ProvideShop t where t.providerBusiness.id = :businessId ")
    ProvideShop findShop( @Param("businessId") String businessId);
}
